﻿using AbpApplication.AppServices;
using AbpApplication.InPut;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Identity.Client;
using System.Collections.Generic;

namespace AbpWebapi.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class BaseServiceController : ControllerBase
    {

        private readonly IBaseService _baseService;
        private readonly IEssService _esService;

        public BaseServiceController(IBaseService baseService, IEssService esService)
        {
            _baseService = baseService;
            _esService = esService;
        }
        [HttpPost]
        [Authorize(Roles = "管理员")]
        public async Task<ApiResponse> Create_Boxs(InPut_BaseService input)=>await _baseService.Create_Boxs(input);
        [HttpPost]
        //[Authorize(Roles = "管理员")]
        public async Task<ApiResponse> Update_Box(InPut_BaseService2 input)=>await _baseService.Update_Box(input);
        [HttpPost]
        [Authorize(Roles = "管理员")]
        public async Task<ApiResponse> Create_Warehouses(InPut_BaseService3 input) => await _baseService.Create_Warehouses(input);
        [HttpPost]
        public async Task<ApiResponsePage> GetList_WarehouseLine(InPut_BaseService4 inPut) =>await  _baseService.GetList_WarehouseLine(inPut);
        [HttpPost]
        public async Task <ApiResponse>   test(request request) => await _baseService.test(request);     
        [HttpPost]
        [Authorize(Roles = "管理员")]
        public async Task<ApiResponse> Update_WarehouseLines(InPut_BaseService5 inPut)=>await _baseService.Update_WarehouseLines(inPut);
        [HttpPost]
        public async Task<ApiResponsePage> GetList_Boxs(InPut_BaseService6 inPut) => await _baseService.GetList_Boxs(inPut);
        [HttpPost]
        public async Task<ApiResponse> CreateMaterialBase(InPut_BaseService7 inPut)=>await _baseService.CreateMaterialBase(inPut);
        [HttpPost]
        //[Authorize(Roles = "管理员")]
        public async Task<ApiResponse> CreateNeetOutMaterial(InPut_BaseService10 InPut) => await _baseService.CreateNeetOutMaterial(InPut);
        [HttpPost]
        public async Task<ApiResponse> DeleteMaterial(InPut_BaseService8 InPut)=>await _baseService.DeleteMaterial(InPut);
        [HttpPost]
        public async Task<ApiResponse> Create_Inlethouses(InPut_BaseService9 input) => await _baseService.Create_Inlethouses(input);
        [HttpPost]
        [Authorize(Roles = "管理员")]
        public async Task<ApiResponse> Create_Inlethouse(InPut_BaseService9 input) => await _baseService.Create_Inlethouse(input);
        [HttpPost]
        public async Task<ApiResponse> GetList_InlethouesCode(string Type)=>await _baseService.GetList_InlethouesCode(Type);
        [HttpPost]
        public async Task<ApiResponse> UpdateTaskOrderState(InPut_BaseService11 InPut)=>await _baseService. UpdateTaskOrderState(InPut);
        [HttpPost]
        public async Task<ApiResponse> CreateTaskOrder(InPut_BaseService12 InPut)=>await _baseService.CreateTaskOrder(InPut);
        [HttpPost]
        public async Task<ApiResponse> CreateTaskOrderOut(InPut_BaseService13 InPut)=>await _baseService.CreateTaskOrderOut(InPut);
        [HttpPost]
        public async Task<ApiResponse> DeleteTaskOrder(List<string> TaskOrderCodes)=>await _baseService.DeleteTaskOrder(TaskOrderCodes);
        [HttpPost]
        public async Task<ApiResponse> MergeBox(InPut_BaseService14 InPut)=>await _baseService.MergeBox(InPut);
        [HttpPost]
        public async Task<ApiResponse> CreateLog(InPut_BaseService15 InPut)=>await _baseService.CreateLog(InPut);
        [HttpPost]
        [Authorize(Roles = "管理员")]
        public async Task<ApiResponse> UpdateNeetQuantity(InPut_BaseService16 InPut)=>await _baseService.UpdateNeetQuantity(InPut);
        [HttpPost]
        public async Task<ApiResponse> GetNeetBoxMaterial(string BoxCode) => await _baseService.GetNeetBoxMaterial(BoxCode);
        [HttpPost]
        public async Task<ApiResponse> GetWarehousequantity()=>await _baseService.GetWarehousequantity();
        [HttpPost]
        public async Task<ApiResponse> Revoke_MaterialBase(string LPN)=>await _baseService.Revoke_MaterialBase(LPN);
        [HttpPost]
        public async Task<ApiResponse> GetDeleteMaterial(InPut_BaseService8 InPut)=>await _baseService.GetDeleteMaterial(InPut);
        [HttpPost]
        public async Task<ApiResponse> GetListCusetom(InPut_BaseService17 InPut) =>await _baseService.GetListCusetom(InPut);
        [HttpPost]
        public async Task<ApiResponse> GetListCusetomLine(Guid CusetomOrder_Id) => await _baseService.GetListCusetomLine(CusetomOrder_Id);
        [HttpPost]
        public async Task<ApiResponse> CreateTaskNeetOut(InPut_BaseService20 InPut) => await _baseService.CreateTaskNeetOut(InPut);
        [HttpPost]
        public async Task<ApiResponse> DeleteNeetMaterial(string MaterialCode)=>await _baseService.DeleteNeetMaterial(MaterialCode);
        [HttpPost]
        public async Task<ApiResponse> CreateTaskManyNeetOut(InPut_BaseService20 InPut) => await _baseService.CreateTaskManyNeetOut(InPut);
        [HttpPost]
        public async Task<ApiResponse> CheckNeetTask()=>await _baseService.CheckNeetTask();
        [HttpPost]
        public async  Task<ApiResponse> DeleteWaste()=>await _baseService.DeleteWaste();
        [HttpPost]
        public async Task<ApiResponse> ReMoveTaskNeetOut(Guid CusetomOrder_Id) => await _baseService.ReMoveTaskNeetOut(CusetomOrder_Id);
        [HttpPost]
        [Authorize(Roles = "管理员")]
        public async  Task<ApiResponse> UpdateMaterialQuantity(InPut_BaseService19 InPut)=>await _baseService.UpdateMaterialQuantity(InPut);
        [HttpPost]
        public async Task<ApiResponse> CreateTaskManyNeetOutNew(InPut_BaseService21 InPut) => await _baseService.CreateTaskManyNeetOutNew(InPut);
        [HttpPost]
        public async Task<ApiResponse> DeleteOrder(List<Guid> CusetomOrder_IdS) => await _baseService.DeleteOrder(CusetomOrder_IdS);
        [HttpPost]
        public async Task<ApiResponse> Create_SowingWall(InPut_BaseService22 InPut)=> await _baseService.Create_SowingWall(InPut);
        [HttpPost]
        public async Task<ApiResponse> Create_TaskOrder_Pda(InPut_BaseService23 InPut) => await _baseService.Create_TaskOrder_Pda(InPut);
        [HttpPost]
        public async Task<ApiResponse> Send_TaskOrder_Pda()=> await _baseService.Send_TaskOrder_Pda();
        [HttpPost]
        public async Task<ApiResponse> Update_SowingWallLine_Pda(string BoxCode) => await _baseService.Update_SowingWallLine_Pda(BoxCode);
     
    }
}
